import request from '@/utils/request'

// 查询工器具遗失报废列表
export function listScrap(query) {
  return request({
    url: '/mes/tm/scrap/list',
    method: 'get',
    params: query
  })
}

// 查询工器具遗失报废详细
export function getScrap(documentId) {
  return request({
    url: '/mes/tm/scrap/' + documentId,
    method: 'get'
  })
}

// 新增工器具遗失报废
export function addScrap(data) {
  return request({
    url: '/mes/tm/scrap',
    method: 'post',
    data: data
  })
}

// 修改工器具遗失报废
export function updateScrap(data) {
  return request({
    url: '/mes/tm/scrap',
    method: 'put',
    data: data
  })
}

// 删除工器具遗失报废
export function delScrap(documentId) {
  return request({
    url: '/mes/tm/scrap/' + documentId,
    method: 'delete'
  })
}
//执行确认
export function execute(documentId) {
  return request({
    url: '/mes/tm/scrap/' + documentId,
    method: 'put'
  })
}
